﻿@namespace MudBlazor
@typeparam T
@inherits MudBaseColumn
@if (Visible)
{
    @if (Mode == Rendermode.Header && Header!= null)
    {
        @Header(DataContext)
    }
    else if (Mode == Rendermode.Item && Row != null)
    {
        @Row(DataContext)
    }
    else if (Mode == Rendermode.Edit && Edit != null)
    {
        @Edit(DataContext)
    }
    else if (Mode == Rendermode.Footer && Footer != null)
    {
        @Footer(DataContext)
    }
    else
    {
        <MudTd></MudTd>
    }
}
@code {

    [Parameter] public T DataContext { get; set; }
    #region Templates
    [Parameter] public RenderFragment<T> Header { get; set; }
    [Parameter] public RenderFragment<T> Row { get; set; }
    [Parameter] public RenderFragment<T> Edit { get; set; }
    [Parameter] public RenderFragment<T> Footer { get; set; }
    #endregion
}
